package com.etc.common;

/**
 * Filename:    ServiceException.java  
 * Description:   业务逻辑异常
 * Copyright:   Copyright (c) 2018-2019 All Rights Reserved.
 * Company:     chinasofti.com Inc.
 * @author:     mazheng 
 * @version:    1.0  
 * Create at:   2020年3月3日 下午3:26:28  
 *  
 * Modification History:  
 * Date         Author      Version     Description  
 * ------------------------------------------------------------------  
 * 2020年3月3日      mazheng      1.0         1.0 Version  
 *
 */
public class ServiceException extends Exception{

    public ServiceException() {
        super();
        // TODO Auto-generated constructor stub
    }

    public ServiceException(Code code) {
        this.code = code;
    }
    public ServiceException(Code code, String msg) {
        super(msg);
        this.code = code;
        
    }
    public ServiceException(String message, Throwable cause, boolean enableSuppression,
                           boolean writableStackTrace) {
        super(message, cause, enableSuppression, writableStackTrace);
        // TODO Auto-generated constructor stub
    }

    public ServiceException(String message, Throwable cause) {
        super(message, cause);
        // TODO Auto-generated constructor stub
    }

    public ServiceException(String message, Code code) {
        super(message);
        // TODO Auto-generated constructor stub
        this.code = code;
    }

    public ServiceException(Throwable cause) {
        super(cause);
        // TODO Auto-generated constructor stub
    }



    private Code code;

    public Code getCode() {
        return code;
    }

    public void setCode(Code code) {
        this.code = code;
    }

  
}
